/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.zx.user.entity;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.BaseEntity;
import com.jeesite.common.entity.Extend;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.fieldtype.OfficeType;

/**
 * 用户表Entity
 * @author zpp
 * @version 2020-01-29
 */
@Table(name="${_prefix}sys_user", alias="a", columns={
		@Column(name="user_code", attrName="userCode", label="用户编码", isPK=true),
		@Column(name="login_code", attrName="loginCode", label="登录账号"),
		@Column(name="user_name", attrName="userName", label="用户昵称", queryType=QueryType.LIKE),
		@Column(name="password", attrName="password", label="登录密码"),
		@Column(name="email", attrName="email", label="电子邮箱"),
		@Column(name="mobile", attrName="mobile", label="手机号码"),
		@Column(name="phone", attrName="phone", label="办公电话"),
		@Column(name="sex", attrName="sex", label="用户性别"),
		@Column(name="avatar", attrName="avatar", label="头像路径"),
		@Column(name="sign", attrName="sign", label="个性签名"),
		@Column(name="wx_openid", attrName="wxOpenid", label="绑定的微信号"),
		@Column(name="user_type", attrName="userType", label="用户类型"),
		@Column(name="ref_code", attrName="refCode", label="用户类型引用编号"),
		@Column(name="ref_name", attrName="refName", label="用户类型引用姓名", queryType=QueryType.LIKE),
		@Column(name="mgr_type", attrName="mgrType", label="管理员类型", comment="管理员类型（0非管理员 1系统管理员  2二级管理员）"),
		@Column(name="pwd_question", attrName="pwdQuestion", label="密保问题"),
		@Column(name="pwd_question_answer", attrName="pwdQuestionAnswer", label="密保问题答案"),
		@Column(name="pwd_question_2", attrName="pwdQuestion2", label="密保问题2"),
		@Column(name="pwd_question_answer_2", attrName="pwdQuestionAnswer2", label="密保问题答案2"),
		@Column(name="pwd_question_3", attrName="pwdQuestion3", label="密保问题3"),
		@Column(name="pwd_question_answer_3", attrName="pwdQuestionAnswer3", label="密保问题答案3"),
		@Column(name="pwd_quest_update_date", attrName="pwdQuestUpdateDate", label="密码问题修改时间"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="identity", attrName="identity", label="身份标识", comment="身份标识(student,teacher)"),
		@Column(name="accept", attrName="accept", label="是否同意条款 0代表不同意 1表示同意"),
		@Column(name="introduce",attrName="introduce",label="用户介绍",comment="用户介绍"),
		@Column(name="state",attrName="state",label="数据状态",comment="数据状态"),
	}, orderBy="a.update_date DESC"
)
public class ZxUser extends DataEntity<ZxUser> {
	
	private static final long serialVersionUID = 1L;
	private String userCode;		// 用户编码
	private String loginCode;		// 登录账号
	private String userName;		// 用户昵称
	private String password;		// 登录密码
	private String email;		// 电子邮箱
	private String mobile;		// 手机号码
	private String phone;
	private String sex;		// 用户性别
	private String avatar;		// 头像路径
	private String sign;		// 个性签名
	private String wxOpenid;		// 绑定的微信号
	private String userType;		// 用户类型
	private String refCode;		// 用户类型引用编号
	private String refName;		// 用户类型引用姓名
	private String mgrType;		// 管理员类型（0非管理员 1系统管理员  2二级管理员）
	private String pwdQuestion;		// 密保问题
	private String pwdQuestionAnswer;		// 密保问题答案
	private String pwdQuestion2;		// 密保问题2
	private String pwdQuestionAnswer2;		// 密保问题答案2
	private String pwdQuestion3;		// 密保问题3
	private String pwdQuestionAnswer3;		// 密保问题答案3
	private Date pwdQuestUpdateDate;		// 密码问题修改时间
	private String identity;		// 身份标识(student,teacher)
	private Integer accept;		// 是否同意条款 0代表不同意 1表示同意
    private String introduce;
    private String firstOffice; //一级 
	private String secondOffice; //二级
    private String officeCode;//归属机构编码
    private String inputOffices;//输入的机构名成
    private Integer state;
    private String employeePosts;
    @Override
    @Valid
	@ExcelFields({
		@ExcelField(title="一级机构", attrName="firstOffice", align=Align.CENTER, sort=7,  type=ExcelField.Type.EXPORT),
		@ExcelField(title="二级机构", attrName="secondOffice", align=Align.CENTER, sort=8,  type=ExcelField.Type.EXPORT),
		@ExcelField(title="归属机构代码", attrName="officeCode", align=Align.CENTER, sort=9,type=ExcelField.Type.IMPORT),
		@ExcelField(title="归属机构", attrName="employee.office", align=Align.CENTER, sort=10, fieldType=OfficeType.class,type=ExcelField.Type.EXPORT),
		@ExcelField(title="用户名称", attrName="userName", align=Align.CENTER, sort=40),
		@ExcelField(title="电子邮箱", attrName="email", align=Align.LEFT, sort=50),
		@ExcelField(title="手机号码", attrName="mobile", align=Align.CENTER, sort=60),
		@ExcelField(title="办公电话", attrName="phone", align=Align.CENTER, sort=70),
		@ExcelField(title="性别", attrName="sex", dictType="sys_user_sex", align=Align.CENTER, sort=75),
		@ExcelField(title="岗位", attrName="employeePosts", align=Align.CENTER, sort=96),
		@ExcelField(title="身份证号", attrName="idCard", align=Align.CENTER, sort=97),
		@ExcelField(title="身份标识", attrName="identity", align=Align.CENTER, sort=100),
		@ExcelField(title="介绍", attrName="introduce", align=Align.CENTER, sort=101),
	})
    public String getId() {
    	return super.getId();
    }
	public String getIntroduce() {
		return introduce;
	}

	public String getEmployeePosts() {
		return employeePosts;
	}
	public void setEmployeePosts(String employeePosts) {
		this.employeePosts = employeePosts;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public String getFirstOffice() {
		return firstOffice;
	}

	public void setFirstOffice(String firstOffice) {
		this.firstOffice = firstOffice;
	}

	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getSecondOffice() {
		return secondOffice;
	}

	public void setSecondOffice(String secondOffice) {
		this.secondOffice = secondOffice;
	}

	public String getOfficeCode() {
		return officeCode;
	}

	public void setOfficeCode(String officeCode) {
		this.officeCode = officeCode;
	}

	public String getInputOffices() {
		return inputOffices;
	}

	public void setInputOffices(String inputOffices) {
		this.inputOffices = inputOffices;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}
	public ZxUser() {
		this(null);
	}

	public ZxUser(String id){
		super(id);
	}
	
	public String getUserCode() {
		return userCode;
	}

	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
	
	public String getLoginCode() {
		return loginCode;
	}

	public void setLoginCode(String loginCode) {
		this.loginCode = loginCode;
	}
	
	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}
	
	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}
	
	@Length(min=0, max=300, message="电子邮箱长度不能超过 300 个字符")
	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}
	
	
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}
	
	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}
	
	public String getSign() {
		return sign;
	}

	public void setSign(String sign) {
		this.sign = sign;
	}
	
	public String getWxOpenid() {
		return wxOpenid;
	}

	public void setWxOpenid(String wxOpenid) {
		this.wxOpenid = wxOpenid;
	}
	
	
	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}
	
	public String getRefCode() {
		return refCode;
	}

	public void setRefCode(String refCode) {
		this.refCode = refCode;
	}
	
	public String getRefName() {
		return refName;
	}

	public void setRefName(String refName) {
		this.refName = refName;
	}
	
	public String getMgrType() {
		return mgrType;
	}

	public void setMgrType(String mgrType) {
		this.mgrType = mgrType;
	}
	
	public String getPwdQuestion() {
		return pwdQuestion;
	}

	public void setPwdQuestion(String pwdQuestion) {
		this.pwdQuestion = pwdQuestion;
	}
	
	public String getPwdQuestionAnswer() {
		return pwdQuestionAnswer;
	}

	public void setPwdQuestionAnswer(String pwdQuestionAnswer) {
		this.pwdQuestionAnswer = pwdQuestionAnswer;
	}
	
	public String getPwdQuestion2() {
		return pwdQuestion2;
	}

	public void setPwdQuestion2(String pwdQuestion2) {
		this.pwdQuestion2 = pwdQuestion2;
	}
	
	public String getPwdQuestionAnswer2() {
		return pwdQuestionAnswer2;
	}

	public void setPwdQuestionAnswer2(String pwdQuestionAnswer2) {
		this.pwdQuestionAnswer2 = pwdQuestionAnswer2;
	}
	
	public String getPwdQuestion3() {
		return pwdQuestion3;
	}

	public void setPwdQuestion3(String pwdQuestion3) {
		this.pwdQuestion3 = pwdQuestion3;
	}
	
	public String getPwdQuestionAnswer3() {
		return pwdQuestionAnswer3;
	}

	public void setPwdQuestionAnswer3(String pwdQuestionAnswer3) {
		this.pwdQuestionAnswer3 = pwdQuestionAnswer3;
	}
	
	public Date getPwdQuestUpdateDate() {
		return pwdQuestUpdateDate;
	}

	public void setPwdQuestUpdateDate(Date pwdQuestUpdateDate) {
		this.pwdQuestUpdateDate = pwdQuestUpdateDate;
	}
	
	public String getIdentity() {
		return identity;
	}

	public void setIdentity(String identity) {
		this.identity = identity;
	}
	
	public Integer getAccept() {
		return accept;
	}

	public void setAccept(Integer accept) {
		this.accept = accept;
	}
	
}